import validator from '../index.js';

export class CreateLeagueInput_Rules {
  constructor() {
    this.date = [
      { required: true, message: '请选择比赛日期', trigger: 'change' }
    ];
    this.name = [
      { required: true, message: '分站赛名称不能为空', trigger: 'blur' }
    ];
    this.competitionCertificationLevelId = [
      { required: true, message: '请选择认证等级', trigger: 'change' }
    ];
    this.address = [
      { required: true, message: '比赛地址不能为空', trigger: 'blur' }
    ];
    this.responsiblePersonName = [
      { required: true, message: '负责人不能为空', trigger: 'blur' }
    ];
    this.responsiblePersonPhone = [
      { required: true, message: '联系电话不能为空', trigger: 'blur' },
      {
        validator(rule, value, callback) {
          callback(validator.checkPhone(value, '手机号码格式错误'));
        },
        trigger: 'blur'
      }
    ];
  }
}
// 积分操作
export class CategoryVO_Rules {
  constructor() {
    this.teamMinMaleMembersCount = [validator.required('积分不能为空', 'change')];
  }
}
